package com.yangjun.common.enums;

public enum TimesTypeEnum {
	one("1次",0),two("2次",1),three("3次",2),four("3-10次",3)
	,five("10-20次",4),six(">20次",5);
	private String timesName;
	private int id;


	private TimesTypeEnum(String timesName, int id) {
		this.timesName = timesName;
		this.id = id;
	}


	public String getTimesName() {
		return timesName;
	}


	public void setTimesName(String timesName) {
		this.timesName = timesName;
	}


	public int getId() {
		return id;
	}


	public void setId(int id) {
		this.id = id;
	}

	public static int getId(String times){
		 if("one".equals(times)){
			 return one.getId();
		 }else if("two".equals(times)){
			 return two.getId();
		 }else if("three".equals(times)){
			 return three.getId();
		 }else if("four".equals(times)){
			 return four.getId();
		 }else if("five".equals(times)){
			 return five.getId();
		 }else if("six".equals(times)){
			 return six.getId();
		 }else{
			 return 0;
		 }
	 }
	public static String getTimesTypeEnum(String times){
		 if("one".equals(times)){
			 return one.getTimesName();
		 }else if("two".equals(times)){
			 return two.getTimesName();
		 }else if("three".equals(times)){
			 return three.getTimesName();
		 }else if("four".equals(times)){
			 return four.getTimesName();
		 }else if("five".equals(times)){
			 return five.getTimesName();
		 }else if("six".equals(times)){
			 return six.getTimesName();
		 }else{
			 return null;
		 }
	 }
}
